package test

import "testing"

func AssertEquals(expect, actual interface{}, t *testing.T) {
	if expect != actual {
		t.Errorf("%s != %s\n", expect, actual)
	}
}

func AssertNotNull(target interface{}, t *testing.T) {
	if target == nil {
		t.Error("target is nil")
	}
}

func AssertTrue(exp bool, t *testing.T) {
	if !exp {
		t.Error("exp is false")
	}
}

func AssertFalse(exp bool, t *testing.T) {
	if exp {
		t.Error("exp is true")
	}
}

func AssertHasError(err error, t *testing.T) {
	if err == nil {
		t.Error("Has no error")
	}
}

func AssertHasNotError(err error, t *testing.T) {
	if err != nil {
		t.Errorf("Has error: %v\n", err)
	}
}

